/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trader.hibernate.blo;

import hibernate.dao.DeliveryInstructionDao;
import hibernate.dao.DeliveryInstructionMillDao;
import hibernate.dao.HibernateUtil;
import hibernate.dao.MillHibernateUtil;
import mill.hibernate.dto.DeliveryInstruction_mill;

/**
 *
 * @author kiendn
 */
public class MediateBLO {
    public DeliveryInstruction_mill find_mill_di(int trader_id){
        DeliveryInstruction_mill di_mill = null;
        try{
            int mill_id = new DeliveryInstructionDao().getDI_mill_id(trader_id);
            di_mill = new DeliveryInstructionMillDao().getDI(mill_id);
        }finally{
            MillHibernateUtil.getSessionFactory().close();
            HibernateUtil.getSessionFactory().close();
        }
        return di_mill;
    }
}
